package action;

import java.util.List;

import service.CountryService;

import entity.Country;
import exception.ServiceException;
import factory.ServiceFactory;

public class CountryListAction extends BaseAction {
	
	private List<Country> countries;
	
	public String execute() {
		try {
			CountryService service = ServiceFactory.getService(CountryService.class);
			countries = service.getCountries();
		} catch (ServiceException e) {
			// TODO: handle exception
		}
		return SUCCESS;
	}

	public List<Country> getCountries() {
		return countries;
	}

	public void setCountries(List<Country> countries) {
		this.countries = countries;
	}

}
